<?php
	/**
	 * User 
	 * @author David Ivins
	 */
	class User extends SDBModel
	{
		public function __construct()
		{
			parent::__construct();
			$this->setDomain($this->_config->domain->name->users);
		}
		
		public function __destruct()
		{
			parent::__destruct();
		}

		/**
		 * getIdentity
		 */
		public function createIdentity()
		{
			# create identity data and write it to session
			$identity = new stdClass();
			$identity->id = $this->_id;
			$identity->username = $this->_attributes['username'];
			$identity->user_type = 'member'; //$this->attributes['user_type'];
			$identity->first_name = $this->_attributes['first_name'];
			$identity->last_name = $this->_attributes['last_name'];
			$identity->email = $this->_attributes['email'];

			return $identity;
		}
	}
